﻿using System;
using YunZuan.Models.Attributes;
using YunZuan.Models.Entities;

namespace YunZuan.Models
{
    [Table(TableName = "yz_Lend_order", PrimaryKey = "LendOrderID")]
    public class LendOrder : BaseEntity 
    {
        public LendOrder()
		{}
		#region Model
		private int _lendorderid;
		/// <summary>
		///购物车ID
		/// </summary>
        [Column(IsAutoIncrement = true)]
        public int LendOrderID
		{
		get{ return _lendorderid;}
		set{this.ChangeNotify<int>("LendOrderID", value, ref _lendorderid);}
		}
        private string _lendorderno;
        /// <summary>
        ///借货单号
        /// </summary>
        public string LendOrderNo
        {
            get { return _lendorderno; }
            set { this.ChangeNotify<string>("LendOrderNo", value, ref _lendorderno); }
        } 
		private int _customerid;
		/// <summary>
		///客户ID
		/// </summary>
		public int CustomerID
		{
		get{ return _customerid;}
		set{this.ChangeNotify<int>("CustomerID", value, ref _customerid);}
		}
		private int _userid;
		/// <summary>
		///团队ID
		/// </summary>
		public int UserID
		{
		get{ return _userid;}
		set{this.ChangeNotify<int>("UserID", value, ref _userid);}
		}
        private long? _goodsid = -1;
		/// <summary>
		///库存ID
		/// </summary>
        public long? GoodsID
		{
		    get{ return _goodsid;}
            set { this.ChangeNotify<long?>("GoodsID", value, ref _goodsid); }
		}
		private int _goodstypeid;
		/// <summary>
		///商品类型
		/// </summary>
		public int GoodsTypeID
		{
		get{ return _goodstypeid;}
		set{this.ChangeNotify<int>("GoodsTypeID", value, ref _goodstypeid);}
		}
        private int? _isreturn = 1;
        /// <summary>
        ///按照退点修改价格，1退点，2倍率
        /// </summary>
        public int? IsReturn
        {
            get { return _isreturn; }
            set { this.ChangeNotify<int?>("IsReturn", value, ref _isreturn); }
        }
        private decimal? _isreturnvalues = 0.00M;
        /// <summary>
        ///1退点，2倍率 具体的值
        /// </summary>
        public decimal? IsReturnValues
        {
            get { return _isreturnvalues; }
            set { this.ChangeNotify<decimal?>("IsReturnValues", value, ref _isreturnvalues); }
        }

		private DateTime? _createtime;
		/// <summary>
		///加入时间
		/// </summary>
		public DateTime? CreateTime
		{
		get{ return _createtime;}
		set{this.ChangeNotify<DateTime?>("CreateTime", value, ref _createtime);}
		}
		private int? _type;
		/// <summary>
		///购物车类型PC IOS Android GZH
		/// </summary>
        public int? Type
		{
            get { return _type; }
            set { this.ChangeNotify<int?>("Type", value, ref _type); }
		}
        private int _orderStatus = 0;
        /// <summary>
        /// 借货前状态
        /// </summary>
        public int OrderStatus
        {
            get { return _orderStatus; }
            set { this.ChangeNotify<int>("OrderStatus", value, ref _orderStatus); }
        }
        private string _remarks;
        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks
        {
            get { return _remarks; }
            set { this.ChangeNotify<string>("Remarks", value, ref _remarks); }
        }
        private decimal? _inventoryCount;
        public decimal? InventoryCount
        {
            get {
                if (_inventoryCount == null)
                    _inventoryCount = 1;
                return _inventoryCount; }
            set { this.ChangeNotify<decimal?>("InventoryCount", value, ref _inventoryCount); }
        }
		#endregion

    }
}
